﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DecisionFramework.Instrument
{
	/// <summary>
	/// Specifies the interface for the publishing policy used by 
	/// Instrumentation. 
	/// </summary>
	/// <remarks>
	/// If this policy answers "true", then the instrumentation will 
	/// be reported to the corresponding IReportInstrumentation.
	/// <remarks>  
	/// Author: Greg Cowin
	/// </remarks> 
	public interface IPublishPolicy
	{
		/// <summary>
		/// Whether it is time to report on the instrumentation. You can override this
        /// to publish after a number of hits, some period of time passing, or some
        /// other completely different way. Be sure not to publish too often 
        /// since it will effect performance.
		/// </summary>
		/// <returns> Whether it is time to report on the instrumentation.</returns>
		bool ShouldPublish(Instrumentation instrumentation);
	}
}
